package com.gexiaobao.pigeon.ui.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.gexiaobao.pigeon.R
import com.gexiaobao.pigeon.app.base.DataBindBaseViewHolder
import com.gexiaobao.pigeon.app.model.bean.CustomContentBean
import com.gexiaobao.pigeon.databinding.ItemCustomContentBinding

/**
 * @Author      : hxw
 * @Date        : 2024/8/22 11:50
 * @Describe    :
 */
class AdapterCustomContent(data: ArrayList<CustomContentBean>) :
    BaseQuickAdapter<CustomContentBean, DataBindBaseViewHolder>(R.layout.item_custom_content, data) {
    override fun convert(holder: DataBindBaseViewHolder, item: CustomContentBean) {
        val binding = DataBindBaseViewHolder.getBinding(holder) as ItemCustomContentBinding
        binding.data = item
        binding.executePendingBindings()//防止列表抖动
    }
}